#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: splice04_sole_dml.py 
@version:
@time: 2022/03/08 
"""
from TapClientCaseData.ColumnGenerateData.dynamic.base.base00_dynamic import POSTGRES05_TYPE
from TapClientCaseData.ColumnGenerateData.dynamic.base.base00_dynamic import GET
from TapClientCaseData.ColumnGenerateData.dynamic.base.base00_dynamic import GET_UPDATE

__all__ = [
    'DML_POSTGRES_SMALLINT', 'DML_POSTGRES_INTEGER', 'DML_POSTGRES_BIGINT', 'DML_POSTGRES_INT2', 'DML_POSTGRES_INT4',
    'DML_POSTGRES_INT8', 'DML_POSTGRES_DECIMAL', 'DML_POSTGRES_NUMERIC', 'DML_POSTGRES_REAL', 'DML_POSTGRES_DOUBLE',
    'DML_POSTGRES_SMALLSERIAL', 'DML_POSTGRES_SERIAL', 'DML_POSTGRES_BIGSERIAL', 'DML_POSTGRES_MONEY',

    'DML_POSTGRES_CHARACTER', 'DML_POSTGRES_VARCHAR', 'DML_POSTGRES_CHARACTER_VARYING', 'DML_POSTGRES_CHAR',
    'DML_POSTGRES_TEXT', 'DML_POSTGRES_BYTEA',

    'DML_POSTGRES_TIMESTAMP', 'DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE', 'DML_POSTGRES_DATE', 'DML_POSTGRES_TIME',
    'DML_POSTGRES_TIME_WITH_TIME_ZONE', 'DML_POSTGRES_INTERVAL', 'DML_POSTGRES_BOOLEAN',

    'DML_POSTGRES_CIDR', 'DML_POSTGRES_INET', 'DML_POSTGRES_MACADDR', 'DML_POSTGRES_MACADDR8',

    'DML_POSTGRES_BIT', 'DML_POSTGRES_BIT_VARYING', 'DML_POSTGRES_UUID', 'DML_POSTGRES_XML', 'DML_POSTGRES_JSON',
    'DML_POSTGRES_JSONB',
    'DML_POSTGRES_ARRAY_ONE', 'DML_POSTGRES_ARRAY_TWO', 'DML_POSTGRES_INT4RANGE', 'DML_POSTGRES_INT8RANGE',
    'DML_POSTGRES_NUMRANGE', 'DML_POSTGRES_TSRANGE', 'DML_POSTGRES_TSTZRANGE', 'DML_POSTGRES_DATERANGE',

    'DML_POSTGRES_SMALLINT_INSERT_1', 'DML_POSTGRES_SMALLINT_INSERT_2', 'DML_POSTGRES_SMALLINT_UPDATE',
    'DML_POSTGRES_INTEGER_INSERT_1', 'DML_POSTGRES_INTEGER_INSERT_2', 'DML_POSTGRES_INTEGER_UPDATE',
    'DML_POSTGRES_BIGINT_INSERT_1', 'DML_POSTGRES_BIGINT_INSERT_2', 'DML_POSTGRES_BIGINT_UPDATE',
    'DML_POSTGRES_INT2_INSERT_1', 'DML_POSTGRES_INT2_INSERT_2', 'DML_POSTGRES_INT2_UPDATE',
    'DML_POSTGRES_INT4_INSERT_1', 'DML_POSTGRES_INT4_INSERT_2', 'DML_POSTGRES_INT4_UPDATE',
    'DML_POSTGRES_INT8_INSERT_1', 'DML_POSTGRES_INT8_INSERT_2', 'DML_POSTGRES_INT8_UPDATE',
    'DML_POSTGRES_DECIMAL_INSERT_1', 'DML_POSTGRES_DECIMAL_INSERT_2', 'DML_POSTGRES_DECIMAL_UPDATE',
    'DML_POSTGRES_NUMERIC_INSERT_1', 'DML_POSTGRES_NUMERIC_INSERT_2', 'DML_POSTGRES_NUMERIC_UPDATE',
    'DML_POSTGRES_REAL_INSERT_1', 'DML_POSTGRES_REAL_INSERT_2', 'DML_POSTGRES_REAL_UPDATE',
    'DML_POSTGRES_DOUBLE_INSERT_1', 'DML_POSTGRES_DOUBLE_INSERT_2', 'DML_POSTGRES_DOUBLE_UPDATE',
    'DML_POSTGRES_SMALLSERIAL_INSERT_1', 'DML_POSTGRES_SMALLSERIAL_INSERT_2', 'DML_POSTGRES_SMALLSERIAL_UPDATE',
    'DML_POSTGRES_SERIAL_INSERT_1', 'DML_POSTGRES_SERIAL_INSERT_2', 'DML_POSTGRES_SERIAL_UPDATE',
    'DML_POSTGRES_BIGSERIAL_INSERT_1', 'DML_POSTGRES_BIGSERIAL_INSERT_2', 'DML_POSTGRES_BIGSERIAL_UPDATE',

    'DML_POSTGRES_MONEY_INSERT_1', 'DML_POSTGRES_MONEY_INSERT_2', 'DML_POSTGRES_MONEY_UPDATE',

    'DML_POSTGRES_CHARACTER_INSERT_1', 'DML_POSTGRES_CHARACTER_INSERT_2', 'DML_POSTGRES_CHARACTER_UPDATE',
    'DML_POSTGRES_VARCHAR_INSERT_1', 'DML_POSTGRES_VARCHAR_INSERT_2', 'DML_POSTGRES_VARCHAR_UPDATE',
    'DML_POSTGRES_CHARACTER_VARYING_INSERT_1', 'DML_POSTGRES_CHARACTER_VARYING_INSERT_2',
    'DML_POSTGRES_CHARACTER_VARYING_UPDATE',
    'DML_POSTGRES_CHAR_INSERT_1', 'DML_POSTGRES_CHAR_INSERT_2', 'DML_POSTGRES_CHAR_UPDATE',
    'DML_POSTGRES_TEXT_INSERT_1', 'DML_POSTGRES_TEXT_INSERT_2', 'DML_POSTGRES_TEXT_UPDATE',

    'DML_POSTGRES_BYTEA_INSERT_1', 'DML_POSTGRES_BYTEA_INSERT_2', 'DML_POSTGRES_BYTEA_UPDATE',

    'DML_POSTGRES_TIMESTAMP_INSERT_1', 'DML_POSTGRES_TIMESTAMP_INSERT_2', 'DML_POSTGRES_TIMESTAMP_UPDATE',
    'DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE_INSERT_1', 'DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE_INSERT_2',
    'DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE_UPDATE',
    'DML_POSTGRES_DATE_INSERT_1', 'DML_POSTGRES_DATE_INSERT_2', 'DML_POSTGRES_DATE_UPDATE',
    'DML_POSTGRES_TIME_INSERT_1', 'DML_POSTGRES_TIME_INSERT_2', 'DML_POSTGRES_TIME_UPDATE',
    'DML_POSTGRES_TIME_WITH_TIME_ZONE_INSERT_1', 'DML_POSTGRES_TIME_WITH_TIME_ZONE_INSERT_2',
    'DML_POSTGRES_TIME_WITH_TIME_ZONE_UPDATE',
    'DML_POSTGRES_INTERVAL_INSERT_1', 'DML_POSTGRES_INTERVAL_INSERT_2', 'DML_POSTGRES_INTERVAL_UPDATE',

    'DML_POSTGRES_BOOLEAN_INSERT_1', 'DML_POSTGRES_BOOLEAN_INSERT_2', 'DML_POSTGRES_BOOLEAN_UPDATE',

    'DML_POSTGRES_CIDR_INSERT_1', 'DML_POSTGRES_CIDR_INSERT_2', 'DML_POSTGRES_CIDR_UPDATE',
    'DML_POSTGRES_INET_INSERT_1', 'DML_POSTGRES_INET_INSERT_2', 'DML_POSTGRES_INET_UPDATE',
    'DML_POSTGRES_MACADDR_INSERT_1', 'DML_POSTGRES_MACADDR_INSERT_2', 'DML_POSTGRES_MACADDR_UPDATE',
    'DML_POSTGRES_MACADDR8_INSERT_1', 'DML_POSTGRES_MACADDR8_INSERT_2', 'DML_POSTGRES_MACADDR8_UPDATE',

    'DML_POSTGRES_BIT_INSERT_1', 'DML_POSTGRES_BIT_INSERT_2', 'DML_POSTGRES_BIT_UPDATE',
    'DML_POSTGRES_BIT_VARYING_INSERT_1', 'DML_POSTGRES_BIT_VARYING_INSERT_2', 'DML_POSTGRES_BIT_VARYING_UPDATE',

    'DML_POSTGRES_UUID_INSERT_1', 'DML_POSTGRES_UUID_INSERT_2', 'DML_POSTGRES_UUID_UPDATE',

    'DML_POSTGRES_XML_INSERT_1', 'DML_POSTGRES_XML_INSERT_2', 'DML_POSTGRES_XML_UPDATE',

    'DML_POSTGRES_JSON_INSERT_1', 'DML_POSTGRES_JSON_INSERT_2', 'DML_POSTGRES_JSON_UPDATE',

    'DML_POSTGRES_JSONB_INSERT_1', 'DML_POSTGRES_JSONB_INSERT_2', 'DML_POSTGRES_JSONB_UPDATE',

    'DML_POSTGRES_ARRAY_ONE_INSERT_1', 'DML_POSTGRES_ARRAY_ONE_INSERT_2', 'DML_POSTGRES_ARRAY_ONE_UPDATE',
    'DML_POSTGRES_ARRAY_TWO_INSERT_1', 'DML_POSTGRES_ARRAY_TWO_INSERT_2', 'DML_POSTGRES_ARRAY_TWO_UPDATE',

    'DML_POSTGRES_INT4RANGE_INSERT_1', 'DML_POSTGRES_INT4RANGE_INSERT_2', 'DML_POSTGRES_INT4RANGE_UPDATE',
    'DML_POSTGRES_INT8RANGE_INSERT_1', 'DML_POSTGRES_INT8RANGE_INSERT_2', 'DML_POSTGRES_INT8RANGE_UPDATE',
    'DML_POSTGRES_NUMRANGE_INSERT_1', 'DML_POSTGRES_NUMRANGE_INSERT_2', 'DML_POSTGRES_NUMRANGE_UPDATE',
    'DML_POSTGRES_TSRANGE_INSERT_1', 'DML_POSTGRES_TSRANGE_INSERT_2', 'DML_POSTGRES_TSRANGE_UPDATE',
    'DML_POSTGRES_TSTZRANGE_INSERT_1', 'DML_POSTGRES_TSTZRANGE_INSERT_2', 'DML_POSTGRES_TSTZRANGE_UPDATE',
    'DML_POSTGRES_DATERANGE_INSERT_1', 'DML_POSTGRES_DATERANGE_INSERT_2', 'DML_POSTGRES_DATERANGE_UPDATE'
]


def POSTGRES_SOLE_GET_INSERT1(dictionary):
    return [dictionary.get('COLUMNS'), dictionary.get('INSERT_1')]


def POSTGRES_SOLE_GET_INSERT2(dictionary):
    return [dictionary.get('COLUMNS'), dictionary.get('INSERT_2')]


# ---------- SOLE DML -----------

DML_POSTGRES_COMMON = GET(POSTGRES05_TYPE, 'COMMON')
DML_POSTGRES_COMMON_WHERE = GET(DML_POSTGRES_COMMON, 'WHERE')
POSTGRES05_DML_TYPE = POSTGRES05_TYPE.get('COLUMNS')

# ---- NUMERIC ----
_DML_POSTGRES_NUMERIC = GET(POSTGRES05_DML_TYPE, 'NUMERIC')

# -- smallint --
DML_POSTGRES_SMALLINT = GET(_DML_POSTGRES_NUMERIC, 'smallint')
DML_POSTGRES_SMALLINT_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_SMALLINT)
DML_POSTGRES_SMALLINT_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_SMALLINT)
DML_POSTGRES_SMALLINT_UPDATE = GET_UPDATE(DML_POSTGRES_SMALLINT)
# -- integer --
DML_POSTGRES_INTEGER = GET(_DML_POSTGRES_NUMERIC, 'integer')
DML_POSTGRES_INTEGER_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_INTEGER)
DML_POSTGRES_INTEGER_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_INTEGER)
DML_POSTGRES_INTEGER_UPDATE = GET_UPDATE(DML_POSTGRES_INTEGER)

# -- bigint --
DML_POSTGRES_BIGINT = GET(_DML_POSTGRES_NUMERIC, 'bigint')
DML_POSTGRES_BIGINT_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_BIGINT)
DML_POSTGRES_BIGINT_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_BIGINT)
DML_POSTGRES_BIGINT_UPDATE = GET_UPDATE(DML_POSTGRES_BIGINT)

# -- int2 --
DML_POSTGRES_INT2 = GET(_DML_POSTGRES_NUMERIC, 'int2')
DML_POSTGRES_INT2_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_INT2)
DML_POSTGRES_INT2_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_INT2)
DML_POSTGRES_INT2_UPDATE = GET_UPDATE(DML_POSTGRES_INT2)

# -- int4 --
DML_POSTGRES_INT4 = GET(_DML_POSTGRES_NUMERIC, 'int4')
DML_POSTGRES_INT4_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_INT4)
DML_POSTGRES_INT4_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_INT4)
DML_POSTGRES_INT4_UPDATE = GET_UPDATE(DML_POSTGRES_INT4)

# -- int8 --
DML_POSTGRES_INT8 = GET(_DML_POSTGRES_NUMERIC, 'int8')
DML_POSTGRES_INT8_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_INT8)
DML_POSTGRES_INT8_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_INT8)
DML_POSTGRES_INT8_UPDATE = GET_UPDATE(DML_POSTGRES_INT8)

# --decimal --
DML_POSTGRES_DECIMAL = GET(_DML_POSTGRES_NUMERIC, 'decimal')
DML_POSTGRES_DECIMAL_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_DECIMAL)
DML_POSTGRES_DECIMAL_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_DECIMAL)
DML_POSTGRES_DECIMAL_UPDATE = GET_UPDATE(DML_POSTGRES_DECIMAL)

# -- numeric --
DML_POSTGRES_NUMERIC = GET(_DML_POSTGRES_NUMERIC, 'numeric')
DML_POSTGRES_NUMERIC_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_NUMERIC)
DML_POSTGRES_NUMERIC_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_NUMERIC)
DML_POSTGRES_NUMERIC_UPDATE = GET_UPDATE(DML_POSTGRES_NUMERIC)

# -- real --
DML_POSTGRES_REAL = GET(_DML_POSTGRES_NUMERIC, 'real')
DML_POSTGRES_REAL_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_REAL)
DML_POSTGRES_REAL_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_REAL)
DML_POSTGRES_REAL_UPDATE = GET_UPDATE(DML_POSTGRES_REAL)

# -- double precision --
DML_POSTGRES_DOUBLE = GET(_DML_POSTGRES_NUMERIC, 'double precision')
DML_POSTGRES_DOUBLE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_DOUBLE)
DML_POSTGRES_DOUBLE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_DOUBLE)
DML_POSTGRES_DOUBLE_UPDATE = GET_UPDATE(DML_POSTGRES_DOUBLE)

# -- smallserial --
DML_POSTGRES_SMALLSERIAL = GET(_DML_POSTGRES_NUMERIC, 'smallserial')
DML_POSTGRES_SMALLSERIAL_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_SMALLSERIAL)
DML_POSTGRES_SMALLSERIAL_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_SMALLSERIAL)
DML_POSTGRES_SMALLSERIAL_UPDATE = GET_UPDATE(DML_POSTGRES_SMALLSERIAL)

# -- serial --
DML_POSTGRES_SERIAL = GET(_DML_POSTGRES_NUMERIC, 'serial')
DML_POSTGRES_SERIAL_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_SERIAL)
DML_POSTGRES_SERIAL_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_SERIAL)
DML_POSTGRES_SERIAL_UPDATE = GET_UPDATE(DML_POSTGRES_SERIAL)

# --bigserial --
DML_POSTGRES_BIGSERIAL = GET(_DML_POSTGRES_NUMERIC, 'bigserial')
DML_POSTGRES_BIGSERIAL_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_BIGSERIAL)
DML_POSTGRES_BIGSERIAL_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_BIGSERIAL)
DML_POSTGRES_BIGSERIAL_UPDATE = GET_UPDATE(DML_POSTGRES_BIGSERIAL)

# MONETARY
DML_POSTGRES_MONEY = GET(POSTGRES05_DML_TYPE, 'MONETARY').get('money')
DML_POSTGRES_MONEY_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_MONEY)
DML_POSTGRES_MONEY_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_MONEY)
DML_POSTGRES_MONEY_UPDATE = GET_UPDATE(DML_POSTGRES_MONEY)

# CHARACTER
_DML_POSTGRES_CHARACTER = GET(POSTGRES05_DML_TYPE, 'CHARACTER')

# -- character_varying --
DML_POSTGRES_CHARACTER_VARYING = GET(_DML_POSTGRES_CHARACTER, 'character_varying')
DML_POSTGRES_CHARACTER_VARYING_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_CHARACTER_VARYING)
DML_POSTGRES_CHARACTER_VARYING_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_CHARACTER_VARYING)
DML_POSTGRES_CHARACTER_VARYING_UPDATE = GET_UPDATE(DML_POSTGRES_CHARACTER_VARYING)

# -- varchar --
DML_POSTGRES_VARCHAR = GET(_DML_POSTGRES_CHARACTER, 'varchar')
DML_POSTGRES_VARCHAR_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_VARCHAR)
DML_POSTGRES_VARCHAR_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_VARCHAR)
DML_POSTGRES_VARCHAR_UPDATE = GET_UPDATE(DML_POSTGRES_VARCHAR)

# -- character --
DML_POSTGRES_CHARACTER = GET(_DML_POSTGRES_CHARACTER, 'character')
DML_POSTGRES_CHARACTER_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_CHARACTER)
DML_POSTGRES_CHARACTER_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_CHARACTER)
DML_POSTGRES_CHARACTER_UPDATE = GET_UPDATE(DML_POSTGRES_CHARACTER)

# -- char --
DML_POSTGRES_CHAR = GET(_DML_POSTGRES_CHARACTER, 'char')
DML_POSTGRES_CHAR_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_CHAR)
DML_POSTGRES_CHAR_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_CHAR)
DML_POSTGRES_CHAR_UPDATE = GET_UPDATE(DML_POSTGRES_CHAR)

# -- text --
DML_POSTGRES_TEXT = GET(_DML_POSTGRES_CHARACTER, 'text')
DML_POSTGRES_TEXT_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_TEXT)
DML_POSTGRES_TEXT_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_TEXT)
DML_POSTGRES_TEXT_UPDATE = GET_UPDATE(DML_POSTGRES_TEXT)

# BINARY_DATA
DML_POSTGRES_BYTEA = GET(POSTGRES05_DML_TYPE, 'BINARY_DATA').get('bytea')
DML_POSTGRES_BYTEA_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_BYTEA)
DML_POSTGRES_BYTEA_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_BYTEA)
DML_POSTGRES_BYTEA_UPDATE = GET_UPDATE(DML_POSTGRES_BYTEA)

# DATE_TIME
DML_POSTGRES_DATE_TIME = GET(POSTGRES05_DML_TYPE, 'DATE_TIME')

# -- timestamp --
DML_POSTGRES_TIMESTAMP = GET(DML_POSTGRES_DATE_TIME, 'timestamp')
DML_POSTGRES_TIMESTAMP_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_TIMESTAMP)
DML_POSTGRES_TIMESTAMP_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_TIMESTAMP)
DML_POSTGRES_TIMESTAMP_UPDATE = GET_UPDATE(DML_POSTGRES_TIMESTAMP)

# -- timestamp with time zone --
DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE = GET(DML_POSTGRES_DATE_TIME, 'timestamp with time zone')
DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE)
DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE)
DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE_UPDATE = GET_UPDATE(DML_POSTGRES_TIMESTAMP_WITH_TIME_ZONE)

# -- date --
DML_POSTGRES_DATE = GET(DML_POSTGRES_DATE_TIME, 'date')
DML_POSTGRES_DATE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_DATE)
DML_POSTGRES_DATE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_DATE)
DML_POSTGRES_DATE_UPDATE = GET_UPDATE(DML_POSTGRES_DATE)

# -- time --
DML_POSTGRES_TIME = GET(DML_POSTGRES_DATE_TIME, 'time')
DML_POSTGRES_TIME_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_TIME)
DML_POSTGRES_TIME_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_TIME)
DML_POSTGRES_TIME_UPDATE = GET_UPDATE(DML_POSTGRES_TIME)

# -- time with time zone --
DML_POSTGRES_TIME_WITH_TIME_ZONE = GET(DML_POSTGRES_DATE_TIME, 'time with time zone')
DML_POSTGRES_TIME_WITH_TIME_ZONE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_TIME_WITH_TIME_ZONE)
DML_POSTGRES_TIME_WITH_TIME_ZONE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_TIME_WITH_TIME_ZONE)
DML_POSTGRES_TIME_WITH_TIME_ZONE_UPDATE = GET_UPDATE(DML_POSTGRES_TIME_WITH_TIME_ZONE)

# -- interval --
DML_POSTGRES_INTERVAL = GET(DML_POSTGRES_DATE_TIME, 'interval')
DML_POSTGRES_INTERVAL_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_INTERVAL)
DML_POSTGRES_INTERVAL_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_INTERVAL)
DML_POSTGRES_INTERVAL_UPDATE = GET_UPDATE(DML_POSTGRES_INTERVAL)

# BOOLEAN
DML_POSTGRES_BOOLEAN = GET(POSTGRES05_DML_TYPE, 'BOOLEAN').get('boolean')
DML_POSTGRES_BOOLEAN_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_BOOLEAN)
DML_POSTGRES_BOOLEAN_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_BOOLEAN)
DML_POSTGRES_BOOLEAN_UPDATE = GET_UPDATE(DML_POSTGRES_BOOLEAN)

# ENUMERATED do not support

# GEOMETRIC

# NETWORK_ADDRESS
DML_POSTGRES_NETWORK = GET(POSTGRES05_DML_TYPE, 'NETWORK_ADDRESS')

# -- cidr --
DML_POSTGRES_CIDR = GET(DML_POSTGRES_NETWORK, 'cidr')
DML_POSTGRES_CIDR_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_CIDR)
DML_POSTGRES_CIDR_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_CIDR)
DML_POSTGRES_CIDR_UPDATE = GET_UPDATE(DML_POSTGRES_CIDR)

# -- inet --
DML_POSTGRES_INET = GET(DML_POSTGRES_NETWORK, 'inet')
DML_POSTGRES_INET_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_INET)
DML_POSTGRES_INET_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_INET)
DML_POSTGRES_INET_UPDATE = GET_UPDATE(DML_POSTGRES_INET)

# -- macaddr --
DML_POSTGRES_MACADDR = GET(DML_POSTGRES_NETWORK, 'macaddr')
DML_POSTGRES_MACADDR_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_MACADDR)
DML_POSTGRES_MACADDR_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_MACADDR)
DML_POSTGRES_MACADDR_UPDATE = GET_UPDATE(DML_POSTGRES_MACADDR)

# -- macaddr8 --
DML_POSTGRES_MACADDR8 = GET(DML_POSTGRES_NETWORK, 'macaddr8')
DML_POSTGRES_MACADDR8_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_MACADDR8)
DML_POSTGRES_MACADDR8_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_MACADDR8)
DML_POSTGRES_MACADDR8_UPDATE = GET_UPDATE(DML_POSTGRES_MACADDR8)

# BIT
# -- bit --
DML_POSTGRES_BIT = GET(POSTGRES05_DML_TYPE, 'BIT').get('bit')
DML_POSTGRES_BIT_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_BIT)
DML_POSTGRES_BIT_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_BIT)
DML_POSTGRES_BIT_UPDATE = GET_UPDATE(DML_POSTGRES_BIT)

# -- bit_varying --
DML_POSTGRES_BIT_VARYING = GET(POSTGRES05_DML_TYPE, 'BIT').get('bit_varying')
DML_POSTGRES_BIT_VARYING_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_BIT_VARYING)
DML_POSTGRES_BIT_VARYING_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_BIT_VARYING)
DML_POSTGRES_BIT_VARYING_UPDATE = GET_UPDATE(DML_POSTGRES_BIT_VARYING)

# TEXT
# DML_POSTGRES_TEXT = GET(POSTGRES05_DML_TYPE, 'TEXT').get('text')
# DML_POSTGRES_TEXT_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_TEXT)
# DML_POSTGRES_TEXT_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_TEXT)
# DML_POSTGRES_TEXT_UPDATE = GET_UPDATE(DML_POSTGRES_TEXT)

# UUID
DML_POSTGRES_UUID = GET(POSTGRES05_DML_TYPE, 'UUID').get('uuid')
DML_POSTGRES_UUID_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_UUID)
DML_POSTGRES_UUID_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_UUID)
DML_POSTGRES_UUID_UPDATE = GET_UPDATE(DML_POSTGRES_UUID)

# XML
DML_POSTGRES_XML = GET(POSTGRES05_DML_TYPE, 'XML').get('xml')
DML_POSTGRES_XML_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_XML)
DML_POSTGRES_XML_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_XML)
DML_POSTGRES_XML_UPDATE = GET_UPDATE(DML_POSTGRES_XML)

# JSON
# -- json --
DML_POSTGRES_JSON = GET(POSTGRES05_DML_TYPE, 'JSON').get('json')
DML_POSTGRES_JSON_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_JSON)
DML_POSTGRES_JSON_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_JSON)
DML_POSTGRES_JSON_UPDATE = GET_UPDATE(DML_POSTGRES_JSON)
# -- jsonb --
DML_POSTGRES_JSONB = GET(POSTGRES05_DML_TYPE, 'JSON').get('jsonb')
DML_POSTGRES_JSONB_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_JSONB)
DML_POSTGRES_JSONB_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_JSONB)
DML_POSTGRES_JSONB_UPDATE = GET_UPDATE(DML_POSTGRES_JSONB)

# ARRAYS
# -- array_one
DML_POSTGRES_ARRAY_ONE = GET(POSTGRES05_DML_TYPE, 'ARRAYS').get('array_one')
DML_POSTGRES_ARRAY_ONE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_ARRAY_ONE)
DML_POSTGRES_ARRAY_ONE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_ARRAY_ONE)
DML_POSTGRES_ARRAY_ONE_UPDATE = GET_UPDATE(DML_POSTGRES_ARRAY_ONE)
# -- array_two --
DML_POSTGRES_ARRAY_TWO = GET(POSTGRES05_DML_TYPE, 'ARRAYS').get('array_two')
DML_POSTGRES_ARRAY_TWO_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_ARRAY_TWO)
DML_POSTGRES_ARRAY_TWO_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_ARRAY_TWO)
DML_POSTGRES_ARRAY_TWO_UPDATE = GET_UPDATE(DML_POSTGRES_ARRAY_TWO)
# RANGE
DML_POSTGRES_RANGE = GET(POSTGRES05_DML_TYPE, 'RANGE')
# -- int4range --
DML_POSTGRES_INT4RANGE = GET(DML_POSTGRES_RANGE, 'int4range')
DML_POSTGRES_INT4RANGE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_INT4RANGE)
DML_POSTGRES_INT4RANGE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_INT4RANGE)
DML_POSTGRES_INT4RANGE_UPDATE = GET_UPDATE(DML_POSTGRES_INT4RANGE)

# -- int8range --
DML_POSTGRES_INT8RANGE = GET(DML_POSTGRES_RANGE, 'int8range')
DML_POSTGRES_INT8RANGE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_INT8RANGE)
DML_POSTGRES_INT8RANGE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_INT8RANGE)
DML_POSTGRES_INT8RANGE_UPDATE = GET_UPDATE(DML_POSTGRES_INT8RANGE)
# -- numrange --
DML_POSTGRES_NUMRANGE = GET(DML_POSTGRES_RANGE, 'numrange')
DML_POSTGRES_NUMRANGE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_NUMRANGE)
DML_POSTGRES_NUMRANGE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_NUMRANGE)
DML_POSTGRES_NUMRANGE_UPDATE = GET_UPDATE(DML_POSTGRES_NUMRANGE)
# -- tsrange --
DML_POSTGRES_TSRANGE = GET(DML_POSTGRES_RANGE, 'tsrange')
DML_POSTGRES_TSRANGE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_TSRANGE)
DML_POSTGRES_TSRANGE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_TSRANGE)
DML_POSTGRES_TSRANGE_UPDATE = GET_UPDATE(DML_POSTGRES_TSRANGE)
# -- tstzrange --
DML_POSTGRES_TSTZRANGE = GET(DML_POSTGRES_RANGE, 'tstzrange')
DML_POSTGRES_TSTZRANGE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_TSTZRANGE)
DML_POSTGRES_TSTZRANGE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_TSTZRANGE)
DML_POSTGRES_TSTZRANGE_UPDATE = GET_UPDATE(DML_POSTGRES_TSTZRANGE)
# -- daterange --
DML_POSTGRES_DATERANGE = GET(DML_POSTGRES_RANGE, 'daterange')
DML_POSTGRES_DATERANGE_INSERT_1 = POSTGRES_SOLE_GET_INSERT1(DML_POSTGRES_DATERANGE)
DML_POSTGRES_DATERANGE_INSERT_2 = POSTGRES_SOLE_GET_INSERT2(DML_POSTGRES_DATERANGE)
DML_POSTGRES_DATERANGE_UPDATE = GET_UPDATE(DML_POSTGRES_DATERANGE)
